{% extends "simple.html" %}

{% block body %}

<div id=results>&nbsp;</div>

<script>
var gbError = false;
var gbSuccess = false;

function imageOnload() {
	gbSuccess = true;
}

function imageOnerror() {
	gbError = true;
}

function doTest() {
	var elem1 = document.getElementById('elem1');
	if ( ( elem1.width >=30 && elem1.height >=30 ) || ( elem1.clientWidth >=30 && elem1.clientHeight >=30 ) ) {
		document.getElementById('results').innerHTML = "This browser <i>does</i> support data: URLs.";
		parent.saveResult('du', 1);
	}
	else {
		document.getElementById('results').innerHTML = "This browser does <i>not</i> support data: URLs.";
		parent.saveResult('du', 0);
	}
}

window.onload = doTest;
</script>

<p>
The image below is loaded using a "data:" URL, also called an "inline image".
This is a way a page can embed resources without requiring an additional HTTP request.

<p>
<img id=elem1 border=0 src=""
  onload="imageOnload()" onerror="imageOnerror()"></a>

{% endblock %}
